package org.jeecg.modules.business.enums;

/**
 * @author:Gan Linghao
 * @date:2020/7/14 0014
 * @time:16:37
 * @description:no description
 */
public enum ManufacturerTypeEnum {

    TABLE_EXCEPTION(1,"表数据异常"),
    BIG_TABLE_EXCEPTION(2,"大表数据异常"),
    USER_TABLE_EXCEPTION(3,"户表数据异常"),
    OTHER(9,"其他异常"),
    ;
    private Integer status;

    private String name;

    ManufacturerTypeEnum(int status, String name) {
        this.status = status;
        this.name = name;
    }


    public void setStatus(int status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getStatus(){
        return status;
    }

    /**
     *
     * @param status
     * @return
     */
    public static String getName(Integer status) {
        for (ManufacturerTypeEnum c : ManufacturerTypeEnum.values()) {
            if (c.getStatus() == status) {
                return c.name;
            }
        }
        return null;
    }

}

